package com.deepexps.security.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.deepexps.security.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author moyi
 * @since 2021-11-11 13:10:55
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据userId获取菜单权限
     *
     * @param userId
     * @return
     */
    List<Long> getNavMenuIds(Long userId);

    /**
     * 根据菜单ID获取用户列表
     * @param menuId
     * @return
     */
    List<SysUser> listByMenuId(Long menuId);

}
